<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('修改员工持证')"/>
    <th:block th:include="include :: datetimepicker-css"/>
    <th:block th:include="include :: select2-css"/>
    <th:block th:include="include :: bootstrap-select-css"/>
</head>
<style>
    input::-webkit-outer-spin-button, input::-webkit-inner-spin-button {
        -webkit-appearance: none;
    }

    input[type="number"] {
        -moz-appearance: textfield;
    }

</style>
<body>
<div class="wrapper wrapper-content animated fadeInRight ibox-content" id="dv">
    <form class="form-horizontal m" id="empCertificate-edit" AUTOCOMPLETE="OFF">
        <input th:value="${data.id}" id="id" name="id" class="form-control" type="hidden"/>
        <h4 class="form-header h4">基本信息</h4>
        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">单位：</label>
                    <div class="col-sm-8">
                        <select name="compId" id="compId" class="form-control noselect2" disabled>
                            <option value="">请选择</option>
                            <option th:each="pro:${userComp}"
                                    th:selected="${data.compId==pro.compId}"
                                    th:value="${pro.compId}"
                                    th:text="${pro.compName}"></option>
                        </select>
                    </div>

                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">年份：</label>
                    <div class="col-sm-8">
                        <input id="years" name="years" th:value="${data.years}" class="form-control" type="text"
                               disabled>
                    </div>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">月份：</label>
                    <div class="col-sm-8">
                        <input id="months" name="months" th:value="${data.months}" class="form-control" type="text"
                               disabled>
                    </div>
                </div>
            </div>
        </div>
        <h4 class="form-header h4">建筑工程类</h4>
        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">一建：</label>
                    <div class="col-sm-8">
                        <input id="firstConstructionNum" th:value="${data.firstConstructionNum}" name="firstConstructionNum" class="form-control" type="number"
                               placeholder="请输入一建人数" required>
                    </div>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">二建：</label>
                    <div class="col-sm-8">
                        <input id="secondConstructionNum" th:value="${data.secondConstructionNum}" name="secondConstructionNum" class="form-control"
                               type="number" placeholder="请输入二建人数"
                               required>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">造价师：</label>
                    <div class="col-sm-8">
                        <input id="costEngineerNum" th:value="${data.costEngineerNum}" name="costEngineerNum" class="form-control" type="number"
                               placeholder="请输入造价师人数" required>
                    </div>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">安全A证：</label>
                    <div class="col-sm-8">
                        <input id="securityANum" th:value="${data.securityANum}" name="securityANum" class="form-control" type="number"
                               placeholder="请输入安全A证人数"
                               required>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">安全B证：</label>
                    <div class="col-sm-8">
                        <input id="securityBNum" th:value="${data.securityBNum}" name="securityBNum" class="form-control" type="number"
                               placeholder="请输入安全B证人数" required>
                    </div>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">安全C证：</label>
                    <div class="col-sm-8">
                        <input id="securityCNum" th:value="${data.securityCNum}" name="securityCNum" class="form-control" type="number"
                               placeholder="请输入安全C证人数"
                               required>
                    </div>
                </div>
            </div>
        </div>
        <h4 class="form-header h4">人资类</h4>
        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">人力资源一级：</label>
                    <div class="col-sm-8">
                        <input id="humanResourcesOneNum" th:value="${data.humanResourcesOneNum}" name="humanResourcesOneNum" class="form-control" type="number"
                               placeholder="请输入人力资源一级人数" required>
                    </div>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">人力资源二级：</label>
                    <div class="col-sm-8">
                        <input id="humanResourcesTowNum" th:value="${data.humanResourcesTowNum}" name="humanResourcesTowNum" class="form-control" type="number"
                               placeholder="请输入人力资源二级人数"
                               required>
                    </div>
                </div>
            </div>
        </div>
        <h4 class="form-header h4">财务类</h4>
        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">注册会计师：</label>
                    <div class="col-sm-8">
                        <input id="registerAccountingNum" th:value="${data.registerAccountingNum}" name="registerAccountingNum" class="form-control"
                               type="number"
                               placeholder="请输入月初人数" required>
                    </div>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">高级会计师：</label>
                    <div class="col-sm-8">
                        <input id="seniorAccountingNum" th:value="${data.seniorAccountingNum}" name="seniorAccountingNum" class="form-control" type="number"
                               placeholder="请输入高级会计师人数"
                               required>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">中级会计师：</label>
                    <div class="col-sm-8">
                        <input id="intermediateAccountingNum" th:value="${data.intermediateAccountingNum}" name="intermediateAccountingNum" class="form-control"
                               type="number"
                               placeholder="请输入中级会计师人数" required>
                    </div>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">助理会计师：</label>
                    <div class="col-sm-8">
                        <input id="assistantAccountingNum" th:value="${data.assistantAccountingNum}" name="assistantAccountingNum" class="form-control"
                               type="number" placeholder="请输入助理会计师人数"
                               required>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: datetimepicker-js"/>
<th:block th:include="include :: select2-js"/>
<script type="text/javascript">
    var prefix = ctx + 'empCertificate';

    function submitHandler() {
        if ($.validate.form()) {
            var data = $("#empCertificate-edit").serializeArray();
            $("input").removeAttr('disabled');
            $("select").removeAttr('disabled');
            $.operate.save(prefix + "/edit", data);
             //parent.sum();

        }
    }
</script>
</body>
</html>